﻿<Window x:Class="Northwind.UI.WPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow"
        MinHeight="350"
        MinWidth="525"
        xmlns:ViewModel="clr-namespace:Northwind.ViewModel;assembly=Northwind.ViewModel"
        DataContext="{Binding 
            Source={x:Static 
            ViewModel:ViewModelLocator.MainWindowViewModelStatic}}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <DockPanel>
        <Border DockPanel.Dock="Top"
                Padding="10"
                Margin="4"
                CornerRadius="5"
                Background="{StaticResource mainBlueBrush}">
            <TextBlock Text="Northwind"
                       Foreground="White"
                       FontWeight="Bold"
                       FontSize="16" />
        </Border>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Expander Padding="10"
                      Margin="4"
                      BorderBrush="DarkGray"
                      ExpandDirection="Right"
                      Grid.Row="0"
                      Grid.Column="0"
                      IsExpanded="True">
                <Expander.Header>
                    <TextBlock Text="Control Panel"
                                FontSize="14"
                                FontWeight="Bold">
                    <TextBlock.LayoutTransform>
                        <RotateTransform Angle="90" />
                    </TextBlock.LayoutTransform>
                    </TextBlock>
                </Expander.Header>
                <StackPanel>
                    <ListBox ItemsSource="{Binding Customers}" 
                                DisplayMemberPath="CompanyName"
                                SelectedValuePath="CustomerID"
                                VerticalAlignment="Top"
                                SelectedValue="{Binding 
                                    SelectedCustomerID}"
                                Height="180"
                                Width="250" />
                    <ContentControl Margin="0, 3">
                        <Hyperlink Command="{Binding ShowDetailsCommand}">
                            <TextBlock Text="Show Details" />
                        </Hyperlink>
                    </ContentControl>
                </StackPanel>                    
            </Expander>
            <TabControl ItemsSource="{Binding Tools}"
                        Margin="4"
                        Grid.Row="0"
                        Grid.Column="1"
                        IsSynchronizedWithCurrentItem="True">
                <TabControl.ItemTemplate>
                    <DataTemplate>
                        <ContentPresenter Content="{Binding DisplayName}" />
                    </DataTemplate>
                </TabControl.ItemTemplate>
            </TabControl>
        </Grid>
    </DockPanel>
</Window>

    